<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template/sitemaster.xhtml"
                xmlns:h="http://java.sun.com/jsf/html">

    <ui:define name="header">
        Register
    </ui:define>

    <ui:define name="content">
        <h:form>
                <table border="0" width="300">
                    <b><h3>Register Account</h3></b>
                    <tr>
                        <td>
                            <h:outputText value="User Name:"/>
                        </td>
                        <td>
                            <h:inputText id="txtEmail" value="#{loginBean.account.email}" required="true" requiredMessage="Email is not empty" style="width: 200px;"/><br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Password:"/>
                        </td>
                        <td>
                            <h:inputSecret id="txtPass" value="#{loginBean.account.pass}" required="true" requiredMessage="Password is not empty" style="width: 200px;"/><br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Confirm Password"/>
                        </td>
                        <td>
                            <h:inputText id="txtConfirm" value="#{loginBean.account.passconfirm}" required="true" requiredMessage="Password confirm is not empty" style="width: 200px;"/><br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="First Name"/>
                        </td>
                        <td>
                            <h:inputText id="txtFirtName" value="#{loginBean.account.firstname}" required="true" requiredMessage="First Name is not empty" style="width: 200px;"/><br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Last Name"/>
                        </td>
                        <td>
                            <h:inputText id="txtLastName" value="#{loginBean.account.lastname}" required="true" requiredMessage="Last Name is not empty" style="width: 200px;"/><br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Phone Number"/>
                        </td>
                        <td>
                            <h:inputText id="txtPhone" value="#{loginBean.account.phone}" required="true" requiredMessage="Phone number is not empty" style="width: 200px;"/><br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            
                        </td>
                        <td>
                            <h:commandButton action="#{loginBean.addAccount}" value="Register"/>
                        </td>
                    </tr>
                </table>

            </h:form>
    </ui:define>

</ui:composition>
